<!--
 * @Author: your name
 * @Date: 2020-10-08 17:08:27
 * @LastEditTime: 2021-02-19 09:39:43
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \solaxcloud\src\App.vue
-->
<template>
  <div id="app">
    <router-view height="100%"/>
  </div>
</template>

<script>
import Header from '@/components/Header.vue'
import NavMenu from '@/components/Sidebar.vue'
import Breadcrumb from '@/components/Breadcrumb.vue'
import '@/assets/css/common.less'
import {bus} from './bus.js'

export default {
  name:'App',
  components:{
    Header,
    NavMenu,
    Breadcrumb
  },
  data(){
    return{
      path:'',
      initMenuFlag:0,
      activeIndex:'',
      menuData: [],
      // notify:''
    }
  },
  created(){
  },
  computed:{
    loginNotify(){
        return this.$store.state.sysStore.loginNotify
    }
  },
  mounted(){
    let that = this
    let notify = ''
    bus.$on('test', function (msg) {
        if(notify){
            notify.close()
        }
        sessionStorage.clear();     //删除用户信息
        that.$router.push({ path: '/login' ,query:{tokenStatus:true}});
        notify = this.$notify({
          message: 'Timeout, please log in again',
          duration: 0
        });
        that.$store.commit('setLoginNotify',notify)
    })
  },
  watch:{
  },
  methods: {
  },
}
</script>


<style lang="less">
#app {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height:100%;
}
</style>
